//let {SyncHook} = require('tapable');
class SyncHook{
    constructor(){
        this.taps =[]
    }
    tap(name,fn){
        this.taps.push(fn)
    }
    call(){
        this.taps.forEach(tap => tap())
    }
}

let hook = new SyncHook();
hook.tap("name",()=>{
    console.log("注册插件");
})
hook.call();